﻿@using TjZheng.Power.DataEntity;
@inherits CMSWebViewPage<object>
@{
    ViewBag.Title = "修改密码";
    Layout = "~/Views/Shared/_EditLayout.cshtml";
}
@section Head{
    @*@Html.CreateUpLoadSource()*@
    @*@Html.CreateEditorSource()*@
}
<div class="easyui-layout" data-options="fit:true">
    <div data-options="region:'center',border:false" class="xhidden">
        <div class="top-block">
            @CurrentButtonTool.Create()
        </div>
        <form id="fr_userinfo" method="post" enctype="multipart/form-data">
            @*@Html.AntiForgeryToken()*@
            <table class="tblContent">
                <colgroup>
                    <col class="colTitle" />
                    <col class="colContent" />
                </colgroup>
                <tr>
                    <td><span class="txtNoNull">*</span>旧密码:</td>
                    <td>
                        @Html.StringBox("OldPassword", "", true, "请输入旧密码", new { type = "password" }, ValidType.Length(64))
                    </td>
                </tr>
                <tr>
                    <td><span class="txtNoNull">*</span>新密码:</td>
                    <td>
                        @Html.StringBox("NewPassword", "", true, "请输入新密码", new { type = "password" }, ValidType.Length(64))
                    </td>
                </tr>
                <tr>
                    <td><span class="txtNoNull">*</span>重新输入新密码:</td>
                    <td>
                        @Html.StringBox("CheckPassword", "", true, "请输入新密码", new { type = "password" }, ValidType.Length(64), ValidType.Equal("#NewPassword"))
                    </td>
                </tr>
            </table>
        </form>
    </div>
</div>
@section Bottom{
    <script type="text/javascript">
        function Save() {
            var objFormEntity = new FormEntity("#fr_userinfo");
            objFormEntity.url = "/UserInfo/SavePassword";
            objFormEntity.submitSuccess = function (InvokeResult) {
                if (InvokeResult.ResultCode == "Success") {
                    alert(InvokeResult.ResultMessage);
                    window.parent.location.href = "/Home/UserLogin";
                } else {
                    ShowMessage(InvokeResult.ResultMessage);
                }
            };
            objFormEntity.isClearData = false;
            objFormEntity.submit();
        }
        function Back() {
            window.location.href = "/UserInfo/DetailInfo";
        }
    </script>
}

